#define _CRT_SECURE_NO_WARNINGS
#include "Sort.h"

void arrPrint(int* arr, int n) {
	for (int i = 0; i < n; i++)
		printf("%d ", arr[i]);
	printf("\n");
}
void testInsert() {
	int arr[] = { 4,3,7,5,8,6 };
	int n = sizeof(arr) / sizeof(arr[0]);
	arrPrint(arr, n);
	InsertSort(arr, n);
	arrPrint(arr, n);
}
void testShell() {
	int arr[] = { 4,3,7,5,8,6 };
	int n = sizeof(arr) / sizeof(arr[0]);
	arrPrint(arr, n);
	ShellSort(arr, n);
	arrPrint(arr, n);
}
void testSelect() {
	int arr[] = { 4,3,7,5,8,6 };
	int n = sizeof(arr) / sizeof(arr[0]);
	arrPrint(arr, n);
	SelectSort(arr, n);
	arrPrint(arr, n);
}
void testQuick() {
	int arr[] = { 4,3,7,5,8,6 };
	int n = sizeof(arr) / sizeof(arr[0]);
	arrPrint(arr, n);
	QuickSortNonR(arr, 0, n - 1);
	arrPrint(arr, n);
}
void testMerge() {
	int arr[] = { 4,3,7,5,8,6 };
	int n = sizeof(arr) / sizeof(arr[0]);
	arrPrint(arr, n);
	MergeSort(arr, n);
	arrPrint(arr, n);
}
void testCount() {
	int arr[] = { 4,3,7,5,8,6 };
	int n = sizeof(arr) / sizeof(arr[0]);
	arrPrint(arr, n);
	CountSort(arr, n);
	arrPrint(arr, n);
}
int main() {
	testInsert();
	testShell();
	testSelect();
	testQuick();
	testMerge();
	testCount();

	return 0;
}